package com.fyl.pattern.prototype.test1;

import java.io.*;

/**
 * 引用类型深克隆
 */
public class Client {
    public static void main(String[] args) throws CloneNotSupportedException, IOException, ClassNotFoundException {
        Citation citation = new Citation();
        Student student = new Student();
        student.setName("张三");
        citation.setStudent(student);
        Citation clone = citation.clone();
        clone.getStudent().setName("李四");
        citation.show();
        clone.show();
    }
}
